package com.cplh.sharding.demo.service;

import com.cplh.sharding.demo.entry.ConHjQzdHis;
import com.cplh.sharding.demo.mapper.ConHjQzdHisMapper;
import com.cplh.sharding.demo.request.ConHjQzdHisQuery;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: kangzhijin
 * @since: 2022/10/11
 * @version: 1.0
 * @description:
 **/
@Service
public class ConHjQzdHisService {

    @Resource
    private ConHjQzdHisMapper conHjQzdHisMapper;


    public PageInfo<ConHjQzdHis> queryOrdersMapperNormal(ConHjQzdHisQuery query) {

        Page page = PageHelper.startPage(query.getPageNo(), query.getPageSize());
        PageInfo<ConHjQzdHis> doPageInfo = new PageInfo();
        doPageInfo.setList(conHjQzdHisMapper.queryHjHis(query));
        doPageInfo.setTotal(page.getTotal());

        return  doPageInfo;
    }





}
